//
//  ViewController.m
//  Disp_Controller
//
//  Created by peterluck on 14/11/7.
//  Copyright (c) 2014年 peterluck. All rights reserved.
//

#import "ViewController.h"
#import "PIDViewController.h"
#import "ComparisonViewController.h"
#import "GeneticViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (IBAction)showPIDCurveView:(id)sender //PID
{
    UINavigationController* naviController = (UINavigationController*)[[UIApplication sharedApplication] keyWindow].rootViewController;
    UIViewController* pidController =  [[PIDViewController alloc] initWithNibName:@"PIDViewController" bundle:nil];
    [naviController pushViewController:pidController animated:YES];
    [pidController release];
}

- (IBAction)showGeneticCurveView:(id)sender //PID
{
    UINavigationController* naviController = (UINavigationController*)[[UIApplication sharedApplication] keyWindow].rootViewController;
    UIViewController* geneticController =  [[GeneticViewController alloc] initWithNibName:@"GeneticViewController" bundle:nil];
    [naviController pushViewController:geneticController animated:YES];
    [geneticController release];
}

- (IBAction)showComparisonCurveView:(id)sender //Comparison
{
    UINavigationController* naviController = (UINavigationController*)[[UIApplication sharedApplication] keyWindow].rootViewController;
    UIViewController* comparisonViewController =  [[ComparisonViewController alloc] initWithNibName:@"ComparisonViewController" bundle:nil];
    [naviController pushViewController:comparisonViewController animated:YES];
    [comparisonViewController release];
}
@end
